package javaweb_work01.classesContrl.Service;

import javaweb_work01.classesContrl.Dao.AddClassesDao;
import javaweb_work01.classesContrl.Entity.Classes;
import javaweb_work01.classesContrl.Factory.ClassesFactory;

public class AddClassesService {
    //合成复用原则
    private AddClassesDao addClassesDao;

    public AddClassesService(){
        this.addClassesDao = ClassesFactory.getAddClassesDao();
    }

    /**
     * 自定义成员方法实现根据参数指定的Classes对象来调用DAO层实现创建班级功能
     * @param classes
     */
    public void addClassesService(Classes classes){
        addClassesDao.addClasses(classes);
    }
}
